Compiling with reference to internal scripting implementation (NativeArray)

I'm interpreting a snippet of JavaScript and getting an object back, but in some cases the object returned is an array. If I ask the returned object for its class I get:
sun.org.mozilla.javascript.internal.NativeArraySounds great, so in the case of an array I want to copy its members to a normal Java array with something like this:
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import sun.org.mozilla.javascript.internal.NativeArray;
public class EvalScript
    public static void main( String ... args )
        throws ScriptException
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName( "js" );
        String snippet = args[0];
        Object rv = engine.eval( snippet );
        if ( rv instanceof NativeArray ) {
            NativeArray jsArray = (NativeArray)rv;
            int numItems = (int)jsArray.getLength();
            Object[] javaArray = new Object[ numItems ];
            for ( int i = 0; i < numItems; i++ ) {
                javaArray[i] = jsArray.get( i, null );
}On compiling it with the latest 1.6 release like:
javac EvalScript.javaI get the output:
EvalScript.java:4: package sun.org.mozilla.javascript.internal does not exist
import sun.org.mozilla.javascript.internal.NativeArray;
                                          ^
EvalScript.java:14: cannot find symbol
symbol  : class NativeArray
location: class EvalScript
        if ( rv instanceof NativeArray ) {
                           ^
EvalScript.java:15: cannot find symbol
symbol  : class NativeArray
location: class EvalScript
            NativeArray jsArray = (NativeArray)rv;
            ^
EvalScript.java:15: cannot find symbol
symbol  : class NativeArray
location: class EvalScript
            NativeArray jsArray = (NativeArray)rv;
                                   ^
4 errorsThe NativeArray class is definitely in the rt.jar:
jar -tvf \work\JDK\1.6.0_02\jre\lib\rt.jar | grep NativeArray 18217 Thu Jul 12 01:46:44 EDT 2007 sun/org/mozilla/javascript/internal/NativeArray.classSo is there some magic I need to invoke to have access to non 'java.' classes, or do I just need to use reflection, or...?

Just typed in this editor - so no syntax-check but you will get the idea:
Pass the internal table and get the reference of it
Store the reference and manipulate the global contents with local field-symbols to which you have assigned the reference.
Hope this helps
Christian
>
> class myObject definition.
> *
>   public section.
> *
>     methods:
>       set_global_table
> importing reference(i_table) type standard
> standard table,
> *
>       change_global_table.
> *
>   private section.
> *
>     data:
> m_pointer_to_table type ref to data
> *
> endclass.
> *
> class myObject implementation.
> *
>   method set_global_table.
> *
     GET REFERENCE of i_table into m_pointer_to_table.
>   endmethod.
> *
> *
>   method change_global_table.
> *
  field-symbols: <lit_table> type any table.
    assign m_pointer_to_table to <lit_table>.
* manipulate <lit_table>
>   endmethod.
> *
> endclass.
> *
> *
> data: gt_itable   type standard table of t_widget,
>       go_myobject type ref to myobject.
> *
> * Main code
> *
>   create object go_myobject.
> *
> *
> *
> * phantom code fills gt_itable
> *
> *
>   call method go_myobject->set_global_table
>                 exporting i_table = gt_itable.
> *
>   call method go_myobject->change_global_table.
> *
> *
>   if gt_itable is initial.
> *
>      write 'this should output'.
> *
>   endif.
>
>
> The code here doesn't work and I've tried messing
> with field-symbols, etc. all to no avail. Thank you
> for any help you could provide!
>
> Brett

Similar Messages

  • Error message display for PO creation with reference to internal orders

    Sir,
    While creating PO with Tcode ME21N (item category I) with reference to ' Internal Order with Funds provided (Tcode KO12), system displaying error message  when Budget is exceeded.
    But when Funds provision is not mentioned (Funds value is initial in KO12) , error message is not being given by the system during Po creation with ME21N.
    Where should I configure in img(Tcode SPRO) , so that system will throw error mesage while creating PO without Budget Provision (Funds not mentioned ) in Internal Orders.
    Regards,
    Srinivasa Murthy

    Hi Anupam,
    The error message display as follows. (when the PO Price exceeds the Planned Funds kept for internal order)
    This error comes during PO creation Process and PO can not be saved. This error message display is correct.
    Item 001 Order 600643 budget exceeded
    Message no. BP604
    Diagnosis
    In document item 001 Order 600643, budget  for fiscal year 2009 was exceeded by 99,960,000.00 INR.
    But  my question is 'when funds have not at all been mentioned for the internal order' then system has to throw the same error as mentioned above. But it is not happening. System is allowing the PO to save which is not correct.
    Regards,
    Srinivasa Murthy

  • Purchase order with reference to internal order

    Dear all
    I am creating a purchase order with reference to a statistical internal order.The total PO value should not exceed the budgeted amount for that statistical internal order.How should i achieve this?
    Thanks in advance.
    Madhavi

    Hello
    First Create Budget Profile.
    Make Specification In Availability Control as Activation Type ''01- Automatic activation during budget allocation''
    Usage 100 and Tick ''Overall'' check box.
    After that Make Setting for your Controlling area in SPRO Path '' Define Tolerance Limit for Availibility control''

  • GI with reference to internal order

    Hello,
    We want to make a GI 261 with reference to an internal order using MIGO and get the error message:
    Order xxxxxx not found or not permitted for goods movement
    Message no. C6001
    Diagnosis
    Either the order xxxxxx does not exist or you have specified an order for which the function you want cannot be executed. For example, no goods receipt for a CO internal order or no goods issue with reference to a reservation can be carried out.
    Procedure
    Check your entries and select an order for which the desired function is permitted.
    I would appreciate any suggestions as I have no idea how to post it.
    Regards,
    Grzegorz Skorus

    Hi Gurus,
    I am also getting same ERROR while doing Goods issue with reference to the Internal order with 261 movement type
    Order 920040 not found or not permitted for goods movement
    Message no. C6001
    Diagnosis
    Either the order 920040 does not exist or you have specified an order for which the function you want cannot be executed. For example, no goods receipt for a CO internal order or no goods issue with reference to a reservation can be carried out.
    Procedure
    Check your entries and select an order for which the desired function is permitted
    Please give the T-code and detailed description for below solution
    the configuration of Field Selection Comparison: moment Type - G/L Account sap sdn

  • Table type with reference type - how to sort?

    I have an internal table lt_refs of the type ZXX_TT_REFS.
    The table type ZXX_TT_REFS is a table of references ("ref. type") to the class ZCL_C.
    The class C has an attribute attr1.
    Now I would like to sort that table. Is there an easy (built-in) way to do this?
    DATA lt_refs TYPE ZXX_TT_REFS.
    DATA lr_ref  TYPE REF TO ZCL_C.
    LOOP AT lt_refs INTO lr_ref.
      "Sort based on lr_ref->attr1. ?
    ENDLOOP.
    "or can I
    SORT lt_refs BY attr1.
    "directly?

    Danial, please see the following.  In the case where you want to sort your reference by an attribute within the object, you can do something like this.
    report zrich_0001.
    *       CLASS lcl_tab DEFINITION
    class lcl_app definition.
      public section.
        data: attri type i.
        methods: constructor importing im_attri type i.
    endclass.
    *       CLASS lcl_tab IMPLEMENTATION
    class lcl_app implementation.
      method constructor.
        attri = im_attri.
      endmethod.
    endclass.
    data: a_app type ref to lcl_app.
    data: a_app_list type table of ref to lcl_app.
    start-of-selection.
      create object a_app exporting im_attri =  3 .
      append a_app to a_app_list.
      create object a_app exporting im_attri =  2 .
      append a_app to a_app_list.
      create object a_app exporting im_attri =  1 .
      append a_app to a_app_list.
      sort a_app_list by <b>table_line->attri</b> ascending .
      check sy-subrc = 0.
    Here is the documentation.
    <i>
    <b>
    Access to Attributes with References in Internal Tables</b>
    If the line type of internal tables includes reference variables as components comp, the attributes attr of the object to which the reference in a line points can be used as key values for reading, sorting and changing table rows. This is possible in the following statements:
    ,,LOOP AT itab ... WHERE comp->attr ...
    ,,READ TABLE itab ... WITH [TABLE] KEY comp->attr = ...
    <b>,,SORT itab BY comp->attr ...</b>
    ,,DELETE itab WHERE comp->attr ...
    ,,MODIFY itab ... TRANSPORTING ... WHERE comp->attr ...
    <b>If a table contains unstructured lines with the type of a reference variable, the attributes of the object to which a line points can be addressed using TABLE_LINE->attr.</b>
    </i>
    Regards,
    RIch Heilman

  • Reference of internal order in PO creation

    Hi Friends,
    Is there any way to control system not to allow to create purchase orders with reference to Internal orders if they are not released and not approved.
    Present it is stopping at GR level if order is not released but we want to control this at PO level. Please suggest if any option to control this.
    Best Regards

    You can use the badi ME_PROCESS_PO_CUST, method PROCESS_ACCOUNT.

  • How to implement a Copy or Create with Reference scenario

    For business objects, you might want to implement a Copy or Create with Reference scenario. The following procedure describes the UI configuration that you need if you want to place a copy button (in our example on an OWL) that starts a quick activity floorplan (on the same BO = Copy, or a different BO = Create with Reference). Pre-requisie in the target BO: The target BO requires a BO element SourceBOID and a Copy action that reads the SourceBO by SourceBOID by query, and copies the elements from the source to the target BO.
    The UI configuration in the target floor plan is:
    1. Open the QAF floor plan of the target BO (target floor plan).
    2. In the DataModel view of the target floor plan, select the Root entry and select Add Data Field from the context menu. Rename the created data element to OBN_OriginBOID.
    3. Choose the Controller tap, and select INPORTS and choose ADD INPORT from the context menu. A new in-port is created. Rename the in-port, for example to Copy.
    4. In the in-port maintenance form, activate the check box OBN INPORT.
    5. Select the namespace of your solution and the target business object.
    6. In the input field SELECT OPERATION enter Copy. A new select operation is created. The combination of business object name (including namespace), business object node and operation identifies the in-port and therefore the related floor plan as navigation target.
    7. Select the port type package /SAP_BYD_UI/SystemPortTypes.PTP.uicomponent.
    8. In the PARAMETERS section of the form, click the ADD button. Maintain the binding of the created parameter to /Root/OBN_OriginBOID. Based on this configuration, the system will transfer the parameter of the in-port to the element in the data model when the OBN is executed.
    9. In the Properties view, select the drop-down list box of the property EVENTS u2022 ONFIRE. Scroll down and select the entry u2026 NEW EVENT HANDLER u2026. The system starts the maintenance window for event handlers. Rename the event handler to CopyIn.
    10. In the OPERATIONS table of the maintenance window for event handlers, select type: BUSINESS OBJECT OPERATION. In the form below the table select the value CREATE for the input field BUSINESS OBJECT OPERATION TYPE. This operation will create a BO instance in the backend when the OBN is executed.
    11. In the OPERATIONS table, create a new operation of type: DATAOPERATION.  In the configuration of the data operation, select the operation type ASSIGN, source expression /Root/OBN_OriginBOID and target expression /Root/<BO>/OriginBOID.
    12. Create a third operation of type: BUSINESS OBJECT ACTION. Select the Copy action of the target business object and click the BIND button. Note: This action enforces another roundtrip to the backend. The Copy action must be implemented so that it will read the origin BO and copy selected data from the origin to the newly created object.
    13. Test the changes in the preview. If no error message is issued, save and activate the floor plan.
    The following procedure describes the configuration in the source floor plan (e.g. OWL floorplan ):
    1. Open the Source BO OWL floor plan (source floor plan).
    2. In the Designer view, place cursor the on the toolbar area and select ADD u2022 APPLICATION-SPECIFIC BUTTON u2022 MY BUTTON from a context menu. Rename the new button to Copy.
    3. In the Properties view, select the drop-down list box of the property MENU INFORMATION u2022 NAVIGATION. The system launches the maintenance window for OBN configuration.
    4. Select the in-port of the target floor plan by selecting the target business object (with namespace and name) the target business object node and the target operation, and the operation Copy.
    5. Choose the navigation style NEWWINDOW.
    6. Close the OBN configuration maintenance window by clicking the OK button. The system creates the OBN configuration, an out-port, that is used by the OBN configuration, and an event handler that uses the out-port and that is assigned to the button (see Properties view, EVENTS u2022 ONFIRE).
    7. Go to the Controller view and rename the OBN configuration to Copy, the new out port to Copy and the new event handler to CopyOut.
    8. Check that the event handler CopyOut fires the out-port Copy.
    9. In the Parameters section of the out-port maintenance form, click the ADD button. Maintain the binding of the created parameter as /Root/<BO>/<BO>ID. Based on this configuration, the system will transfer the identifier of the selected source BO to the out-port data structure when the OBN is executed.
    10. In the Operations table, select type: FIREOUTPORT. In the form below the table select the out-port CopyOut.
    11. Test the changes in the preview. If no error message is issued, save and activate the floor plan.

    Hi Dries-
    There are no pre-packaged solutions with BADIs since they are, by definition, custom development.  If that's the path you need to go down then consider the following high level alternatives:
    Incorporate custom code into the BPC Write Back BADI.  You can restrict the execution of the BADI using filters on the BADI definition, so that the BADI execution only occurs when a data manager package is called, and only for some defined combination of applications/appsets.  Utilized the standard copy/move functions delivered in Data Manager. When the BADI is called, interrogate each record being processed (table CT_ARRAY) and determine if the record has a value you want to process (i.e. save to the target application).  Skip any record that has a zero value.
    Another alternative is to develop the BADI as custom logic.  Data Manager parameters can be picked up in Script Logic and the values can be sent to the BADI by adding parameters.  Please see an example of parmater use in the "How To" document for Destination App at:
    [EPM How To Guides|https://wiki.sdn.sap.com/wiki/display/BPX/Enterprise%20Performance%20Management%20%28EPM%29%20How-to%20Guides]  > "How-to Desitnation App"
    Regards,
    Sheldon

  • Book expenses against Internal Order with reference to PO which is created against Cost Center.

    Dear Users,
    We have an issue, we created PO against Cost Center and now we want to book its expenses(MIR7) against internal order. So if possible suggest me any solution for this.
    Thanks,
    Manoj.

    Hi
    The only other way is to post a manual JV for such a PO where in you debit the expense account with reference to IO and credit the cost center with expense account. Now do the GRN against the PO with reference to Cost Center.
    If you cannot modify the PO, unfortunately, this can be the only way out.
    Regards
    Sanil Bhandari

  • Create internal order with reference - Do not copy distribution rule group

    Hi,
    I'm creating an internal order with reference to another order through tcode KO01. When i will display the new internal order, i already have distribuion rule group that was copied from the reference order. To delete the incorrect distribution rule group i execute tcode KO02, however this information do not appear in tcode KO02.
    What should be done to delete this settlement rule? I do not want to copy the settlement rules from the old internal order.
    Thanks in advance.
    Regards,
    Ana Fernandes

    Hi.
    'What should be done in order to do not copy this information when i create the internal order with reference?'
    in tcode kot2_opa do not maintain Settlement profile for Order category 3
    Also go to KOM2 and delete Settlement rule for order, from which you copying.
    'in table COBRB i can see the information however i can not delete it. The validy period is empty.'-in su53 check authority

  • Internal Order Budget Check for PO with reference to PR / RFQ

    Hi All,
    I have a scenario where the budget availability control is not working for PO created with reference to PR or RFQ. While creating the PO if i modify the PO value more than RFQ or PR value then system is looking for budget control.
    If we create a direct PO system is checking for Budget control where the PO value is more than availability budget.
    We have the budget control check with internal order for services and non stock material based on substitution rule created for cost element group and cost center group.
    In tolerance limits budget availability control we have not activated for PR, itu2019s activated from PO.
    Kindly let me know what is the reason for budget availability control is not active where the PO is created with reference to PR or RFQ.
    Thanks & Regards,
    Rama Mohan

    493900 - FAQ: Release Strategy:
    It is not possible to create a purchase order if the referenced purchase requisition is not released. But the system allows you to put the purchase order on hold and then release the purchase requisition.
    On the other hand you can create a purchase order with reference to an unreleased request of quotation.

  • Facing Problem in creation on Customer Master Record with reference

    Dear SAP Experts,
    I am making a New Customer master record with referenec to existing one. Account  Group """ Stock Transfer - Depot""" do not use internal no assignment, we put external no to customer code. but when we enter the customer master with reference to existing one, system shows the error.....enter a no between A001 and Z999.
    Customer Record Details-
    Account Group - Stock Transfer Depot
    Customer - 1101
    Compnay Code- 1000
    Sales Organisation - 1000
    Distribution Channel -20
    Division - 01
    Reference:
    Customer - 2001
    Comapny Code - 2000
    Sales Organisation - 2000
    Distribution Channel - 20
    Division - 01
    Error: ENTER A NO BETWEEN  A001 AND Z999
    I m not getting why system showing this type of error, should i need to configure new customer code sumwhere in IMG if yes please let me know.
    Lokking forward for your quick response on the same.
    Regards
    Parul Deshwal

    Hi Parul Deshwal,
    - The number range is created in XDN1.
    - The number range is assigned to the account group "Stock Transfer - Depot" in SAP Customizing Implementation Guide>Financial Accounting>Accounts Receivable and Accounts Payable>Customer Accounts>Master Data>Preparations for Creating Customer Master Data>Assign Number Ranges to Customer Account Groups
    Remember - If you are entering an external number it generally means the number is created in an external system and replicated to your system.
    Help - Check what external number was used last by doing SE16 on table KNA1 and use the account group "Stock Transfer - Depot" as a selection parameter.
    Best regards,
    Glynn

  • Kernel26-icc compiled with Intel's compiler instead of gcc

    I'm working on kernel26-icc, it's the kernel26 but compiled with Intel's compiler. Can't seem to upload it to AUR ("Invalid name: only lowercase letters are allowed.")
    http://www.linuxdna.com/
    So far I've this:
    PKGBUILD
    # Maintainer: Mathias Burén <[email protected]>
    pkgname=('kernel26-icc' 'kernel26-icc-firmware' 'kernel26-icc-headers') # Build icc kernel
    _kernelname=${pkgname#kernel26-icc}
    _basekernel=2.6.33
    pkgver=${_basekernel}
    pkgrel=1
    arch=(x86_64)
    license=('GPL2')
    url="http://www.linuxdna.com/"
    source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
    # the main kernel config files
    config.x86_64
    # standard config files for mkinitcpio ramdisk
    kernel26-icc.preset
    http://www.linuxdna.com/dna-2.6.33-intel64.patch)
    makedepends=('icc')
    md5sums=('c3883760b18d50e8d78819c54d579b00'
    '5c91374d56f115ba4324978d5b002711'
    'a4fd3c59751194bc118c70d1348436ab'
    'a307beb562eb7e68a6f3e2fb5fc216a3')
    build() {
    cd ${srcdir}/linux-$_basekernel
    cat ../config.x86_64 >./.config
    patch -p1 < ../dna-2.6.33-intel64.patch || return 1
    if [ "${_kernelname}" != "" ]; then
    sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
    fi
    # get kernel version
    make prepare
    # load configuration
    # Configure the kernel. Replace the line below with one of your choice.
    make menuconfig # CLI menu for configuration
    #make xconfig # X-based configuration
    #make oldconfig # using old config from previous kernel version
    # ... or manually edit .config
    # stop here
    # this is useful to configure the kernel
    #msg "Stopping build"
    #return 1
    yes "" | make config
    # build!
    make bzImage modules || return 1
    package_kernel26-icc() {
    pkgdesc="The Linux Kernel and modules built with ICC"
    backup=(etc/mkinitcpio.d/${pkgname}.preset)
    depends=('coreutils' 'kernel26-icc-firmware>=2.6.33' 'module-init-tools' 'mkinitcpio>=0.5.20')
    install=kernel26-icc.install
    optdepends=('crda: to set the correct wireless channels of your country')
    KARCH=x86
    cd ${srcdir}/linux-$_basekernel
    # get kernel version
    _kernver="$(make kernelrelease)"
    mkdir -p ${pkgdir}/{lib/modules,boot}
    make INSTALL_MOD_PATH=${pkgdir} modules_install || return 1
    cp System.map ${pkgdir}/boot/System.map26${_kernelname}
    cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
    # # add vmlinux
    install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
    # install fallback mkinitcpio.conf file and preset file for kernel
    install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset || return 1
    # set correct depmod command for install
    sed \
    -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
    -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
    -i $startdir/kernel26.install
    sed \
    -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
    -e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
    -e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
    -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
    echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
    # remove build and source links
    rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
    # remove the firmware
    rm -rf ${pkgdir}/lib/firmware
    package_kernel26-icc-headers() {
    pkgdesc="Header files and scripts for building modules for kernel26-icc"
    mkdir -p ${pkgdir}/lib/modules/${_kernver}
    cd ${pkgdir}/lib/modules/${_kernver}
    ln -sf ../../../usr/src/linux-${_kernver} build
    cd ${srcdir}/linux-$_basekernel
    install -D -m644 Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Makefile
    install -D -m644 kernel/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
    install -D -m644 .config \
    ${pkgdir}/usr/src/linux-${_kernver}/.config
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
    for i in acpi asm-{generic,x86} config linux math-emu media net pcmcia scsi sound trace video; do
    cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
    done
    # copy arch includes for external modules
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
    cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
    # copy files necessary for later builds, like nvidia and vmware
    cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
    cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
    # fix permissions on scripts dir
    chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
    cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
    if [ "$CARCH" = "i686" ]; then
    cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
    fi
    cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
    # add headers for lirc package
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
    cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
    for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
    cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
    done
    # add docbook makefile
    install -D -m644 Documentation/DocBook/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile
    # add dm headers
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
    cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
    # add inotify.h
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
    cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/
    # add wireless headers
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
    cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
    # add dvb headers for external modules
    # in reference to:
    # http://bugs.archlinux.org/task/9912
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
    cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
    # add dvb headers for external modules
    # in reference to:
    # http://bugs.archlinux.org/task/11194
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
    # in reference to:
    # http://bugs.archlinux.org/task/13146
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    # add xfs and shmem for aufs building
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
    cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
    # add headers vor virtualbox
    # in reference to:
    # http://bugs.archlinux.org/task/14568
    cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
    # add headers for broadcom wl
    # in reference to:
    # http://bugs.archlinux.org/task/14568
    cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
    # copy in Kconfig files
    for i in `find . -name "Kconfig*"`; do
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
    cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
    done
    cd ${pkgdir}/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm
    # add header for aufs2-util
    cp -a ${srcdir}/linux-$_basekernel/include/asm-generic/bitsperlong.h ${pkgdir}/usr/src/linux-${_kernver}/include/asm/
    chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
    find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
    # remove unneeded architectures
    rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
    package_kernel26-icc-firmware() {
    pkgdesc="The included firmware files of kernel26-icc"
    cd ${srcdir}/linux-$_basekernel
    make firmware || return 1
    make INSTALL_MOD_PATH=${pkgdir} firmware_install || return 1
    kernel26-icc.preset
    # mkinitcpio preset file for kernel26-icc
    # DO NOT EDIT THIS LINE:
    source /etc/mkinitcpio.d/kernel26-icc.kver
    ALL_config="/etc/mkinitcpio.conf"
    PRESETS=('default' 'fallback')
    #default_config="/etc/mkinitcpio.conf"
    default_image="/boot/kernel26-icc.img"
    #default_options=""
    #fallback_config="/etc/mkinitcpio.conf"
    fallback_image="/boot/kernel26-icc-fallback.img"
    fallback_options="-S autodetect"
    kernel26-icc.install
    # arg 1: the new package version
    # arg 2: the old package version
    KERNEL_NAME=-icc
    KERNEL_VERSION=2.6.33-icc
    post_install () {
    # updating module dependencies
    echo ">>> Updating module dependencies. Please wait ..."
    depmod $KERNEL_VERSION
    # generate init ramdisks
    echo ">>> MKINITCPIO SETUP"
    echo ">>> ----------------"
    echo ">>> If you use LVM2, Encrypted root or software RAID,"
    echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
    echo ">>> More information about mkinitcpio setup can be found here:"
    echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
    echo ""
    echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
    /sbin/mkinitcpio -p kernel26${KERNEL_NAME}
    post_upgrade() {
    pacman -Q grub &>/dev/null
    hasgrub=$?
    pacman -Q grub2 &>/dev/null
    hasgrub2=$?
    pacman -Q lilo &>/dev/null
    haslilo=$?
    # reminder notices
    if [ $haslilo -eq 0 ]; then
    echo ">>>"
    if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
    echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
    else
    echo ">>> You appear to be using the LILO bootloader. You should run"
    echo ">>> 'lilo' before rebooting."
    fi
    echo ">>>"
    fi
    if grep "^[^#]*/boot" /etc/fstab 2>&1 >/dev/null; then
    if ! grep "/boot" /etc/mtab 2>&1 >/dev/null; then
    echo "WARNING: /boot appears to be a seperate partition but is not mounted"
    echo " This is most likely not what you want. Please mount your /boot"
    echo " partition and reinstall the kernel unless you are sure this is OK"
    fi
    fi
    if [ "`vercmp $2 2.6.13`" -lt 0 ]; then
    # important upgrade notice
    echo ">>>"
    echo ">>> IMPORTANT KERNEL UPGRADE NOTICE"
    echo ">>> -------------------------------"
    echo ">>> As of kernel 2.6.13, DevFS is NO LONGER AVAILABLE!"
    echo ">>> If you still use DevFS, please make the transition to uDev before"
    echo ">>> rebooting. If you really need to stay with DevFS for some reason,"
    echo ">>> then you can manually downgrade to an older version:"
    echo ">>>"
    echo ">>> # pacman -U http://archlinux.org/~judd/kernel/kernel26-scsi-2.6.12.2-1.pkg.tar.gz"
    echo ">>>"
    echo ">>> If you choose to downgrade, don't forget to add kernel26-scsi to your"
    echo ">>> IgnorePkg list in /etc/pacman.conf"
    echo ">>>"
    echo ">>> (NOTE: The following portion applies to uDev users as well!)"
    echo ">>>"
    echo ">>> If you use any DevFS paths in your GRUB menu.lst, then you will not"
    echo ">>> be able to boot! Change your root= parameter to use the classic"
    echo ">>> naming scheme."
    echo ">>>"
    echo ">>> EXAMPLES:"
    echo ">>> - change root=/dev/discs/disc0/part3 to root=/dev/sda3"
    echo ">>> - change root=/dev/md/0 to root=/dev/md0"
    echo ">>>"
    fi
    # generate new init ramdisk
    if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
    echo ">>> --------------------------------------------------------------"
    echo ">>> | WARNING: |"
    echo ">>> |mkinitrd is not supported anymore in kernel >=2.6.18 series!|"
    echo ">>> | Please change to Mkinitcpio setup. |"
    echo ">>> --------------------------------------------------------------"
    echo ">>>"
    fi
    # updating module dependencies
    echo ">>> Updating module dependencies. Please wait ..."
    depmod $KERNEL_VERSION
    echo ">>> MKINITCPIO SETUP"
    echo ">>> ----------------"
    if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
    echo ">>> Please change your bootloader config files:"
    echo ">>> Grub: /boot/grub/menu.lst | Lilo: /etc/lilo.conf"
    echo "------------------------------------------------"
    echo "| - initrd26.img to kernel26${KERNEL_NAME}.img |"
    echo "| - initrd26-full.img to kernel26${KERNEL_NAME}-fallback.img |"
    echo "------------------------------------------------"
    fi
    if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
    echo ""
    echo ">>> New PATA/IDE subsystem - EXPERIMENTAL"
    echo ">>> ----------"
    echo ">>> To use the new pata drivers, change the 'ide' hook "
    echo ">>> to 'pata' in /etc/mkinicpio.conf HOOKS="
    echo ">>> The new system changes: /dev/hd? to /dev/sd?"
    echo ">>> Don't forget to modify GRUB, LILO and fstab to the"
    echo ">>> new naming system. "
    echo ">>> eg: hda3 --> sda3, hdc8 --> sdc8"
    echo ""
    echo ">>> piix/ata_piix (Intel chipsets) - IMPORTANT"
    echo "----------"
    echo ">>> If you have enabled ide/pata/sata HOOKs in /etc/mkinitcpio.conf"
    echo ">>> the 'ata_piix' module will be used."
    echo ">>> This may cause your devices to shift names, eg:"
    echo ">>> - IDE: devices from hd? to sd?"
    echo ">>> - SATA: sda might shift to sdc if you have 2 other disks on a PIIX IDE port."
    echo ">>> To check if this will affect you, check 'mkinitcpio -M' for piix/ata_piix"
    echo ""
    fi
    echo ">>> If you use LVM2, Encrypted root or software RAID,"
    echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
    echo ">>> More information about mkinitcpio setup can be found here:"
    echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
    echo ""
    echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
    if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
    /sbin/mkinitcpio -p kernel26${KERNEL_NAME} -m "ATTENTION:\nIf you get a kernel panic below
    and are using an Intel chipset, append 'earlymodules=piix' to the
    kernel commandline"
    else
    /sbin/mkinitcpio -p kernel26${KERNEL_NAME}
    fi
    if [ "`vercmp $2 2.6.21`" -lt 0 ]; then
    echo ""
    echo "Important ACPI Information:"
    echo ">>> Since 2.6.20.7 all possible ACPI parts are modularized."
    echo ">>> The modules are located at:"
    echo ">>> /lib/modules/$(uname -r)/kernel/drivers/acpi"
    echo ">>> For more information about ACPI modules check this wiki page:"
    echo ">>> 'http://wiki.archlinux.org/index.php/ACPI_modules'"
    fi
    post_remove() {
    rm -f /boot/kernel26${KERNEL_NAME}.img
    rm -f /boot/kernel26${KERNEL_NAME}-fallback.img
    Then there's of course the config, it's based on kernel26 at the moment,.
    I'm building it now, to test. I had to install icc manually because the AUR package for icc didn't work for me. I had to install icc manually (run the installer), but that wasn't enough. Before makepkg, you have to add the icc to $PATH e.g.
    PATH=$PATH:/opt/intel/Compiler/11.1/064/bin/intel64
    and execute iccvars_intel64.sh which is in that folder.
    Last edited by Fackamato (2010-02-25 23:43:38)

    Ashren wrote:So there is a significant performance gain with ICC? Compilation time wise or?
    icc kernel compiles in similar time as gcc kernel, or if there any differences these may be negligible. To be honest I was not really interested in compiling times (was doing somethig else as it takes ~12 min on my system to finish kernel compilation), but rather with overall kernel performance. This is not the same as OS performance, but I am planning to compile firefox with icc and maybe some other stuff (if I am bored enough).
    If you have 32-bit OS (I have no idea how it will work on 64-bit), try it. I can't post PKGBUILD for 32-bit icc kernel because I don't use PKGBUILD for kernels or nvidia as I have found it limiting/cumbersome/unnecessary (while PKGBUILDs work great for anything else on Arch).
    The only part really annoying is intel server speed. Downloading icc sources (710MB for 32-bit only) tahes two hours. If you try to get 32/64bit sources even longer (1GB download).
    32-bit icc PKGBUILD package requires only one modification related to Release Notes otherwise makepkg will fail. Once installed export icc path, edit kernel Makefile and change one line related to compiler: change gcc to icc. You can also add some compiling optimizations.
    Pretty easy if you did compile kernel before.
    note added:
    actually combination of icc and zen seems to have nice effect on desktop responsiveness (this is 2.6.33)
    Last edited by broch (2010-02-26 19:54:57)

  • Latest  32-bit Java 7 compiled with /LARGEADDRESSAWARE?

    While searching around, I didn't have a whole lot of success getting a clear answer, thus I appeal to this forum...
    A customer of ours wants to continue using the 32-bit Java 7 VM on 64-bit Windows 2008, but would like to use as large a heap as possible. Has the Windows 32-bit Java 7 VM been compiled with /LARGEADDRESSAWARE? Is there any documentation about this?
    Thanks,
    -- Jim C

    The 32-bit JVM for Windows is not compiled with LARGEADDRESSAWARE, and based upon recent space optimizations with Java 7, is likely not to be anytime soon. In the past, some avoided the 64-bit JVM if they didn't need the extra heap space because it incurred significant memory overhead. That is not necessarily the case now. In fact Oracle recommends using the 64-bit JVM even if your heap requirements don't exceed 4GB. Why?
    1. The 64-bit JVM will automatically use 32-bit references on the heap when its size is below 4GB. The command-line switch -XX:+|-UseCompressedOops, available in Java 7, enables/disables this mode and by default is on. Not all internal pointers will be 32-bit, but nonetheless your application running in 64-bit mode should be much smaller than previous 64-bit versions. For a technical description, check out this article:
    https://wikis.oracle.com/display/HotSpotInternals/CompressedOops
    2. The 64-bit JVM has access to more registers and hence more opportunities for performance optimizations. This helps generate faster code.

  • Importing a photo folder just with references creates a photo library 2/3 of its size. crazy!

    after ignoring iphoto for many reasons over the last years i thought i give it a try with the new photo app.
    i imported a 70gb photo folder - turning OFF to copy it into the library first, just refering to them - and now it ate up all my space by creating a 41gb (!!!) photo library just with references alone. so now i have a 70gb folder plus an index file that is 41gb big. i am beyond baffled.
    am i doing something wrong here or are they crazy?
    they cannot possibly think this is a smart way to store photos with the small internal hard drives they give us nowadays can they?

    it gets even worse. "photos" has created empty subfolders of almost every photo in my original photo folder.
    thank you apple. good job.

  • Excise duty not determined in goods receipt with reference to PO.

    Dear All,
    I am implementing Condition based CIN.  I have created PO and maintained all excise duties in XK11 transactions. Excise duty has determined in PO. But When I am creating MIGO with reference to PO the excise duty is not copied from Purchase order.
    Please suggest.
    Thanks & Regards

    Dear All,
    If you have any idea, Please let me know.
    Thanks & Regards

Maybe you are looking for

  • I purchased iPhone 4 from qatar and using in india. Is it possible to use the same in USA

    Hi I purchased iPhone 4 from qatar and have been using in india for past 2  years. Now I am going to shift to US, so just want to know the phone is comptabile in US networks?

  • How to use XPath with Namespaces in the xml ?

    Hi all, I need to reference a certain Node in a Document using XPath notation. The problem is the the XML Document contains Namespaces inside it f.e. <xn:SubNetwork id="JRANM">     <xn:VsDataContainer id="1">        <xn:vsDataType>vsDataAreas</xn:vsD

  • Recognizes Discs, but not after burning

    Whenever I put a blank CD into my MBP (core duo) it recognizes it and asks what to do, and is able to burn it. However if I put an already burned MP3 in the drive, it doesn't do anything - I can't even eject it, I have to go into terminal and type "d

  • Lightroom 3 and Canon SX30 IS Photo transfer problem

    Hello, I recently replaced my stolen SX20 IS with a SX30 IS and picked up Lightroom as well. I have novice experience on photoshop and more extensive experience with iPhoto. I am working with the the 3.4 version for Lightroom that I downloaded the up

  • Aperture issues with video playback in slideshow

    I'm trying to add a few videos into a slideshow but seem to be hitting an issue with playback. The mpeg4 files play perfectly fine in my project folder but when I drag it into my slideshow I only hear the audio of the video, no picture. Anyone know w