How do you deal with API calls that do not exist in some versions of OS X

For example, I have been writing this app to manage the ipfw (Darwin's side of it). I have been confused about a lot of things because the command could do more then the API calls.
As it turns out, there is another firewall API ip_fw2 which does all this stuff I have been trying to figure out.
The problem is that OS X 10.3 does not have ip_fw2. I could check the versions of the OS and do some if (OSX > 10.3) then do ip_fw2 else ip_fw.
The question is, the code for ip_fw2 is in my binary and even if I never call it, will the loader have a problem on 10.3? I know in some cases on windows having an API call in your code that is not even run, will prevent the exe from even loading. There is this lazy linking thing I think you can do to work around that. Can you do that on OS X and what compiler options do I need?

TheSilverHammer wrote:
Thats some nice info, but what if it is not a "framework"? These are basic Darwin API calls, not Apple Frameworks.
Last sentence on the page:
"If you need to link to a library instead of a framework, you can use the -weak_library linker command instead of -weak_framework."
TheSilverHammer wrote:
I did not define printf so I can't weak link it.
This doesn't make any sense. You didn't define any of the symbols in any of the frameworks or libraries Apple provides--that does not inhibit your ability to link against them, weakly or otherwise.

Similar Messages

  • Has anyone experienced problems with Mackeeper? I did not complete downloading this software. Yet, occasionally when on the internet, I will have the MacKeeper multi-colored circle replace my pointer. How do you deal with this?

    Has anyone experienced problems with Mackeeper? I did not complete downloading this software. Yet, occasionally when on the internet, I will have the MacKeeper multi-colored circle replace my pointer. How do you deal with this?

    Welcome to Apple Support Communities
    Don't download MacKeeper. Users complain about this app and it damages OS X. Also, Mac OS X knows how to take care of itself, so you don't need any other cleaning application that may damage OS X. See > https://discussions.apple.com/docs/DOC-3691

  • Hyperlinks in cells, how do you deal with it?

    I've got the hyperlinks palette open (Windows menu / Interactive / Hyperlinks)
    Selecting a cell (or a table), that I would like to be clickable in a PDF, disables the hyperlinks address text field:
    Obviously hyperlinks from cells are not supported.
    How do you deal with it? Do you put empty textboxed on top of each cell that should be clickable?
    Thanks,
    Andreas

    @Andreas – to choose buttons over text based hyperlinks would mean you can define the area that is responsive like you want (the size is the size of the button) and you could design different button states in different ways (color, images, what not…).
    For the scripter in you: Hyperlink objects have no geometric bounds, Button objects have…
    Just an idea:
    Imagine a script that is scanning all cells of a selected table and if there are hyperlinks detected uses position, width and height of that cell to generate a button just on top of the cell (it could be well on a different layer above) using the information the hyperlink provides. Every time the table is changed by the user and the script is fired again, the old buttons are removed and new buttons will be built…
    If there are more hyperlinks than one in a specific cell, the buttons will be built around the area the hyperlinked text will occupy…
    Uwe

  • How do you deal with error message when downloading movie on iPad?  It was 75% complete.

    How do you deal with error message when downloading movie on iPad2.  Movie was 75% complete. 

    I was using wifi.  It shows as a purchase on iTunes but it does not show up on iTunes for download.  I keep getting the download error with our a number attached on the iPad.  Very frustrating.   Apple has been of no help at all. 

  • HT201737 how do you close a thumb drive that does not show in finder?

    How do you close a thumb drive that does not show in finder?

    What do you mean by "Close?"
    Eject??
    If so, you could use Go to Computer to find it if it is not in the Sidebar or on the Desktop. Ctrl-click or Right-click on the drive and choose Eject <diskname>
    Or, you could set it to show in the SideBar in the Finder Preferences, SideBar tab. Then, it would have an eject icon next to it in the Sidebar.

  • SP2013: List does not exist / The page you selected contains a list that does not exist. It may have been deleted by another user

    There are dozens of entries regarding "
    List does not exist / The page you selected
    contains a list that does not exist. It may have been deleted by another user" and none of them are really SP 2013 so i thought I would create this entry. 
    I am getting the error above after creating a simple list with 4 columns.  the list is created during a new site definition activation but when I click on my list, I get the error above.  the list works if I deactivate the feature and re-activate
    it.  but has the error whenever the new site definition is created.  
    Has anybody encountered this issue on SP 2013?

    Hi,
    For your issue, there are plenty of possible reasons offered when we search this issue online.
    Here are similar issue posts, check whether they are helpful:
    http://sharepoint.stackexchange.com/questions/98239/list-does-not-exist-error-when-opening-the-views
    http://sharepoint2u.com/?p=56https://shareyourpoint.wordpress.com/2012/04/12/list-does-not-exist-the-page-you-selected-contains-a-list-that-does-not-exist-it-may-have-been-deleted-by-another-user-sharepoint-2010-error/
    http://spnovice.blogspot.com/2012/10/list-does-not-exist-or-does-it.html
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Lisa Chen
    TechNet Community Support

  • List does not exist . The page you selected contains a list that does not exists. It may have been deleted by another user

    Hi everybody!
    I have a sharepoint 2013 farm with 5 sever. I upgraded a site from sharepoint 
    2007 to sharepoint 2013. I had some problems to install and configure workflow manager and register it. but by now I found problems and I can create a workflow and run it successfully. My big problem is when I try to get a lookup field in my flow. the
    flow suspended and I got the following error:
    “List does not exist . The page you selected contains a list that does not exists. It may have been deleted by another user.”
    Any solution???
    Thanks in advance!

    Hi,
    Please make sure the source list of the lookup column and the list which consumes the content from the lookup column exists on the site collection.
    In addition, to correct this problem the following steps should be applied:
    Delete the affected Workflow association
    Go to "Central Administration" - "Application Management"
    Select the affected web application and choose "General Settings" - "Resource Throttling"
    Increase the value configured as "List View Lookup Threshold"
    Perform an iisreset to ensure that all in memory instances of the web application settings are gone
    Add the Workflow association back to the list
    More information is here:
    http://social.technet.microsoft.com/Forums/en-US/3aeeba20-07dd-4e46-941b-a3db1bb3577e/sharepoint-2013-designer-workflow-the-page-you-selected-contains-a-list-that-does-not-exist?forum=sharepointcustomization
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How do I deal with Tokenized strings that are blank?

    I'm writing a little application that writes data to a file. It sends data to the file as a "|" delineated string. Then I use tokenizer to break up the string as follows:
    try {
                                  String searchtext = SearchTxt.getText();
                                  String tokenString = "";
                                  String[] returnData = new String[8];
                                  File filedata = new File("bigbase.txt");
                                  BufferedReader in = new BufferedReader(
                                  new FileReader(filedata));
                                  String line = in.readLine();
                                  while ( line != null) {
                                  Pattern pat = Pattern.compile(searchtext);
                                  Matcher mat = pat.matcher(line);
                                       if ( mat.find() ) {
                                       StringTokenizer t = new StringTokenizer(line, "|");
                                       maintextArea.setText("");
                                       int count = 0;
                                            while (t.hasMoreTokens()) {
                                                 tokenString = t.nextToken();
                                                 returnData[count] = tokenString;
                                                 maintextArea.append(tokenString + " ");
                                                 System.out.println(tokenString);
    etc etc etc
    The problem is that when the tokens are blank, I get an endless loop when I try to print out the data on that last line. How do I deal with Tokens that are blank so they don't endlessly loop my output?
    Thanks
    MrThis

    Most people would probably tell you to use:
    String.split(...);
    But I'm not most people and I wrote this class before regex support was added to the String class which is based on StringTokenizer but supports empty tokens:
    http://www.discoverteenergy.com/files/SimpleTokenizer.java

  • Can you open with Pages documents that were created in a 2004 version of Microsoft word for Mac?

    Can you open in Pages documents that were created in a 2004 version of Microsoft Word for Mac?

    Pages '09 will open .doc files from Word 2004. The Mac OS is not what is in question. Pages '09 opens Word 2004 documents and if the same version of Pages will run in Lion and in Mountain Lion ..... Thats all that matters.
    I trust you were using MS Office 2004 and would now like to buy Pages?

  • How are you dealing with Comptia CEUs? Do it, or let expire?

    Helps, I think most places I think if you have a few years of experience these things kind of become meaningless in many cases it seems. I think the certs are more get your foot in the door or if maybe you're dealing with gov't, etc that may have some mandated need for these. I think at some point the justification of certs lessens.
    In some cases though even experiencecan be useless though (although most prefer it over certs). I knew a person that was in I.T since the 90s, started working on newer systems with SATA, etc, mobile stuff. He would do all kinds of stupid crap took pliers to disconnect SATA cables ripped the connector off HDD, had no idea how user profiles worked so would just delete them to fix outlook, lost people's docs, etc at least once. Eventuallyhe was demoted, they tried to get him to do A+ as refresher, or something...

    I was just looking at this, I took some more specialized security classes this summer. They said this should count for Comptia CEUs. I was kind of always under the impression you just somehow submitted these things, or your experience and something to verify the experience. I looked on the site and it looks like they also want like $50 just for you to add them. Like $300 for the cert, and then you want like $50 a year for CEU fee that seems a bit ridiculous to me.
    If I wasn't looking for a job and had more experience I'd say forget it let it expire. I don't see why people with any real experience level would even bother dealing with this unless some odd reason it was mandatory at work, etc. I honestly think Comptia is kind of shooting themselves in the foot doing this. I suppose if it's something to do with like CEU processing, etc...
    This topic first appeared in the Spiceworks Community

  • TS1884 How do you cope with a system that shuts itself down after a safe boot progress bar is completed?

    How do you resolve a problem with a system that shuts itself down after a safe reboot and when the progress bar is completed? Thanks.

    Thanks for you response - the honest answer is I don't know, not being particularly IT literate. I do know however that I'm running Maverick if that is of any help?
    I also tried the Command R route, along with holding some other keys as per the Apple troubleshooting guide, but no luck. My wife pointed out though that the system was running slowly over the last few days and we had quite a lot of the 'spinning beach ball' before being able to undertake tasks.
    Lastly, I inserted my start up disk bit as the system is unable to start I'm now unable to retrieve it. All-in-all a real pain.
    Appreciate any advice. Many thanks.
    Philip

  • How do you deal with separate shifts/phones/lines/etc?

    I'm not entirely sure of the exact question i'm trying to ask, but essentially how do you handle phone/Agent logins where the agents are not at dedicated desks?  Meaning, they may not sit at the same location every day, or there may be other shifts that sit at that location when they're gone.
    What do you do with their personal extensions
    What do you do with the IPCC Extension
    Maybe i'm just trying to overthink this and it's simpler than i think.
    What does everyone else do?
    JM

    Hi
    Yes, they would log into the phone and then the CAD software seperately.
    A seperate specific extension for IPCC is optional; lots of my customers just have a single, personal extension that doubles as their IPCC extension without any problems.
    The only mandatory bits are that each agent must have a unique, non shared extension that is set on their 'end user' page as their IPCC Extension.
    So
    - the physical phones would have non-user-specific 'logged out' numbers
    - each user would have an EM profile that has a unique extension (and optional personal extension if you prefer)
    - each user would have that unique/ipcc extension set as the IPCC extension on their user config
    - they log on to the phone, and their extension(s) appear on the phone in place of the 'logged out' number
    - they can then log into the Agent software
    Regards
    Aaron
    Please rate helpful posts and mark answered questions that you've got a satisfactory response from to help identify useful content in the forums...
    https://supportforums.cisco.com/docs/DOC-6212

  • Canadian BC users, how are you dealing with HST, GST and PST/QST?

    Hi, I'm new here and I've been building my first BC eCommerce site for a client for almost a year. It's a business to business site, dealing with about 5000 SKUs. It's currently in trial mode, and we're about to go live with it. I have a problem with taxes I hoped I'd be able to sort out, but haven't found a solution.
    My client's head office is in Ontario and they sell from there, and also from Quebec, though online sales will be limited from Ontario for now. Ontario, like B.C., where I am, and a number of other provinces have HST. The remaining provinces have GST and PST/QST, except Alberta, which only has GST. My client sells thoughout Canada, and also to the U.S.
    Scenario 1) When one sells from an HST province to a customer in another HST province, the seller must collect and remit the HST for the buyer's province. For example, I work from B.C. with 12% HST, and my client has 13% HST in Ontario. I have to invoice them for my services, collecting and remitting 13% HST.
    Scenario 2) When one sells from any province to a customer in a non-HST province other than Quebec, the seller charges GST and is encouraged, and depending on the province they are selling to, required, to register for that province's PST and collect and remit that tax as well. Otherwise the customer is required to self-assess the PST on the purchase.
    Scenario 3) When one sells from any province to a customer in Quebec, they must apply the GST to the purchase, and then apply the QST (Quebec Sales Tax) to that total. Again, out of province sellers are expected to collect and remit the QST.
    Scenario 1 is fine. Currently I've set up all HST provinces with their corresponding rate.
    Scenario 2 is problematic from a legal taxation standpoint. I've set up all GST+PST provinces and Quebec with 5% GST only. This will not be acceptable to my client as their sales volumes are quite high and they have to remit other province's PST.
    Scenario 3 seems impossible on BC, but will become a lesser problem until January 2013, when Quebec changes to Scenario 2 (i.e. the QST will no longer piggy-back the GST but will be raised so there is no change to the total tax)
    Further, most businesses will want to see the GST and PST appear separately on the invoice, not calculated together as seems to be the case now.
    Has anyone managed to set up GST and PST/QST in the system, so both taxes appear in the cart/checkout process, and separately on the invoice?
    Thanks for any assistance!

    This might require the discussion to move to the advanced code development section, but I'll post it here first anyway.
    So after about 2 weeks, I'm not sure there's a solution to this. I've tried a variety of JavaScript and JQuery approaches to do a show/hide of the appropriate tag based on the province chosen in the {tag_shippingoptions} drop down. The cleanest way was with JQuery and I got it to work outside of Business Catalyst, but not when implemented in my cart.
    The problems seems to be threefold.
    1. The onchange of the "shipping state" dropdown calls ApplyTaxRate() in an unmodifiable back-end .js file. If I try to have local JS or JQ work on the same function call to do my show/hide, not only does the show/hide not work, but it breaks communication with the back-end .js so no taxes get calculated/updated.
    2. If I create my own shipping menus calling the same functions (acutally just copy/pasted the inspected HTML), the taxes update OK, but the menu selections don't persist, AND if I then inject my show/hide, the show/hide doesn't work and all the functionality of the ApplyTaxRate function breaks.
    3. If I try to call an additional function for the show/hide, from the onchange of my own menu, the ApplyTaxRate function works, but the additional fucntion doesn't work as it does outside of BC.
    Here is my partial code. Any help?
    <div class="shippingStateDiv"><span id="shippingStateSpan">Destination State<br />
                </span><select onchange="ApplyTaxRate(this.value,4638834,1,1,332304);taxDisplay(this.value);" class="shippingDropDown" id="shippingState" name="shippingState">
                <option value="-1">Please Select</option>
                <option value="147264">AB</option>
                <option value="130632">BC</option>
                <option value="147266">MB</option>
                <option value="130633">NB</option>
                <option value="130634">NL</option>
                <option value="130635">NS</option>
                <option value="147269">NT</option>
                <option value="147270">NU</option>
                <option value="130631">ON</option>
                <option value="147268">PE</option>
                <option value="147267">QC</option>
                <option value="147265">SK</option>
                <option value="147271">YT</option>
                </select></div>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
            <script>
    function taxDisplay(id) {
        var mySel = $("#shippingOptions").children("option:selected").text().replace(/\s/g,"")
        $('.answers').hide() 
        $('.answer'+mySel).show()       
    </script>
    <td><strong>
                <div class="answerPleaseSelect answers" style="display: none;">Choose Dest. State</div>
                <div class="answerAB answers" style="display: none;">GST: {tag_invoicetotaltaxamount}</div>
                <div class="answerBC answers" style="display: none;">HST: {tag_invoicetotaltaxamount}</div>
                <div class="answerMB answers" style="display: none;">{tag_invoicetotaltaxamount,MB,7,GST,PST}</div>
                <div class="answerNB answers" style="display: none;">HST: {tag_invoicetotaltaxamount}</div>
                <div class="answerNL answers" style="display: none;">HST: {tag_invoicetotaltaxamount}</div>
                <div class="answerNS answers" style="display: none;">HST: {tag_invoicetotaltaxamount}</div>
                <div class="answerNT answers" style="display: none;">GST: {tag_invoicetotaltaxamount}</div>
                <div class="answerNU answers" style="display: none;">GST: {tag_invoicetotaltaxamount}</div>
                <div class="answerON answers" style="display: none;">HST: {tag_invoicetotaltaxamount}</div>
                <div class="answerPE answers" style="display: none;">{tag_invoicetotaltaxamount,PE,10.5,GST,PST}</div>
                <div class="answerQC answers" style="display: none;">{tag_invoicetotaltaxamount,QC,9.975,GST,QST}</div>
                <div class="answerSK answers" style="display: none;">{tag_invoicetotaltaxamount,SK,5,GST,PST}</div>
                <div class="answerYT answers" style="display: none;">GST: {tag_invoicetotaltaxamount}</div>
                </strong></td>

  • How do you deal with losing a client?

    Gary D Williams wrote:Personal opinion only.TravisIT wrote:Word in the grape vine is that the new owner will now be doing all the IT work. Normally with my other clients this wouldn't be a big deal, I happily tell them everything I know about the setup, hand over some documentation and let them know I'm always here if they ever need anything.The documentation should ALREADY be handed over. As part of any work that was done, documentation should be a part of it. always.To clarify, they do already have documentation. I always hand it over when I complete a job. But whether or not they put it someplace they can find it again it up to them. 90% of the time I'm met with "can you give me copies of blah blah" when they already have it.

    In addition to my full time job as an IT Manager, I also own a Consulting Company that provides IT services to some businesses in town.I recently found out that my favorite and longest client has sold their business to new owners (it's a restaurant). I haven't "officially" been told this, but I found out. Word in the grape vine is that the new owner will now be doing all the IT work. Normally with my other clients this wouldn't be a big deal, I happily tell them everything I know about the setup, hand over some documentation and let them know I'm always here if they ever need anything.This client is a little different .. I've developed a relationship with the business itself and the employees (yes I know this is probably Consulting 101 on what not to do ..) but they were my very first client and they treat me like part of their normal...
    This topic first appeared in the Spiceworks Community

  • How to deal with the rule that do not use "object" class to declear a class

    I run my flex project in sonar. And there is a rule "Do not use Object class ".
    I just want to know how to deal with this problem.
    I mean, when I try to write a base class, I don't know which kind of class will be transfered in by reference, which type I can declear instead of "object"?

    Check out this example:
    The moment I put in the code >> box1.addItem("hello"); << and run the application, the BusNameListener is fired. Hope this makes sense.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class JFrameExample {
    private JComboBox box1;
    public JFrameExample() {
    box1 = new JComboBox();
    box1 .setMinimumSize(new Dimension(300, 24));
    box1 .setPreferredSize(new Dimension(300, 24));
    box1.addActionListener(new BusNameListener());
    box1.addItem("hello");
    JFrame f = new JFrame("This is a test");
    f.setSize(400, 150);
    Container content = f.getContentPane();
    // content.setBackground(Color.white);
    content.setLayout(new FlowLayout());
    content.add(box1);
    f.setVisible(true);
    class BusNameListener implements ActionListener {
    public void actionPerformed(ActionEvent e) {
    JComboBox cb = (JComboBox) e.getSource();
    String item = (String) cb.getSelectedItem();
    if (item != null) {
    JOptionPane.showInputDialog(null,
    "Specify...", "File Import",
    JOptionPane.OK_CANCEL_OPTION);
    }

Maybe you are looking for

  • IP SLA Request size (ARR data portion) UDP Jitter

    Looking through the documentation for ip sla udp jitter, Cisco says these are the default values - "By default, ten packet frames (N), each with a payload size of 10 bytes (S), are generated every 10 ms (T), and the operation is repeated every 60 sec

  • How to get rid of stuck app?

    My niece downloaded Instagram to my iPad while she was visiting this summer.  After she left I removed it from my iPad (held down until wiggled clicked x).   Everything was fine until iOS 6 update when it appeared in my update list along with a numbe

  • Pb with file in jar

    I develop a small app which need to read information on text file in the Jar. The Emulation in Eclipse works well but when I use netbeans to make easily the Jar I have a problem and the program is unable to connect to the file. Where must I stock the

  • Entity object attribute with a list of objects

    Does anyone know how one sets up an entity object that has an attribute with a list of objects as the type? (assuming that's supported) as in: CREATE TYPE phones AS VARRAY(10) OF varchar2(10); Create table suppliers (supcode number(5), Company varcha

  • Powershot G12 freezes

    I have a Powershot G12 purchased in Dec. 2010 so it's out of warranty. I have had several occassions where the camera freezes and either will not open or freezes with the lens extended. I have also had times when the camera seems to be working proper