Sponsored Content
Top Forums Programming Error: call to ‘__open_too_many_args' Post 302918894 by bayat on Friday 26th of September 2014 04:28:14 AM
Old 09-26-2014
Error: call to ‘__open_too_many_args'

Hi there,
While compiling a makefile on ubuntu 12.04 LTS (64-bit) encountered with this error:

HTML Code:
gcc -c -O -DLinux -I /usr/include/readline -I ./inc f_evt.c
In file included from /usr/include/fcntl.h:252:0,
             from ./inc/f_evt.h:10,
             from f_evt.c:43:
  In function ‘open',
  inlined from ‘f_evt_put_open' at f_evt.c:738:37:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:45:26: error: call to  ‘__open_too_many_args' declared with attribute error: open can be called  either with 2 or 3 arguments, not more
make: *** [f_evt.o] Error 1
HTML Code:
f_evt.c: 738: if((ps_chan->l_channel_no=open(c_file,PUT__CRT_FLAG,EF_FILE_ACCE,c_mode))== -1)
HTML Code:
 __errordecl (__open_too_many_args,"open can be called either with 2 or 3 arguments, not more");
fcntl2.h:45 : open (const char *__path, int __oflag, ...)
{
  if (__va_arg_pack_len () > 1)
    __open_too_many_args ();

  if (__builtin_constant_p (__oflag))
    {
      if ((__oflag & O_CREAT) != 0 && __va_arg_pack_len () < 1)
    {
      __open_missing_mode ();
      return __open_2 (__path, __oflag);
    }
      return __open_alias (__path, __oflag, __va_arg_pack ());
    }
HTML Code:
f_evt.h : 10 : #include <fcntl.h>
HTML Code:
 f_evt.c : 43 : #include "f_evt.h"
with the following declarations In function ‘open':

HTML Code:
CHARS c_file[80]; /*Name of file*/ 
#define PUT__CRT_FLAG  O_CREAT|O_RDWR 
#define DEF_FILE_ACCE  S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH  /* rw-r--r-- */ 
CHARS c_mode[80];
How do I fix it? Thanks in advance.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to differentiate system call from library call

Hi, Ho do I differentiate system call from library call? for example if I am using chmod , how do I find out if it is a system call or library call? Thanks Muru (2 Replies)
Discussion started by: muru
2 Replies

2. Infrastructure Monitoring

diffrence between method call and function call in perl

Hello, I have a problem with package and name space. require "/Mehran/DSGateEngineLib/general.pl"; use strict; sub System_Status_Main_Service_Status_Intrusion_Prevention { my %idpstatus; my @result; &General_ReadHash("/var/dsg/idp/settings",\%idpstatus); #print... (4 Replies)
Discussion started by: Zaxon
4 Replies

3. Shell Programming and Scripting

[Perl] Capture system call error message.

Hi, I googled a bit, but could not find the answer to my problem. But I am sure it is a common issue. I have this code: #!/bin/perl -w #-d use strict; sub remsh_test() { my $host = $_; printf "\n----\n\n"; printf "remsh to $host with system call\n"; my $result = system... (3 Replies)
Discussion started by: ejdv
3 Replies

4. Shell Programming and Scripting

PERL SSH call error

I have a Perl Script #!/usr/local/bin/perl $server_name = "info-xyz-05"; my $value = `/usr/bin/ssh -f $server_name /users/salesadm/MGFINFA/bridgerftpup.sh`; The above calls a shell script on another server called bridgerftpup.sh. This script has several commands and needs to call... (2 Replies)
Discussion started by: alfredo123
2 Replies

5. Web Development

Fatal Error: Call to undefined function imagefilter()

I am using PHP5 in ubuntu 9.10. First I installed PHP and GD as separate package. I tried doing manipulation with images using php image function. When I try using the function imagefilter(), it was not worked and got the solution that need to compile the PHP with the bundled version of GD. So... (0 Replies)
Discussion started by: skg
0 Replies

6. Shell Programming and Scripting

error when call function in bash script

Dear all, Could you please advice as I when call function i found the following error " refills: command not found" note that refills is function name. following also the function and how i call it function refills { echo "formatting refills and telepin" >> $log awk -F,... (20 Replies)
Discussion started by: ahmed.gad
20 Replies

7. Shell Programming and Scripting

Date Call in Script Error

Hello, Got a simple script: a="Something" b=$(date +"%y%j") c="something else" d="$a$b$c" echo "$d" On running it gives the error: scripty.sh: syntax error at line 2: `b=$' unexpected Can't understand it, any ideas? (3 Replies)
Discussion started by: Damocles
3 Replies

8. Programming

C: error in wait system call

i made this program but when i compile this code, compiler make this error, is an error on wait() system call but argumenti is right, or not?: esercizio.c:80:9: error: incompatible type for argument 1 of ‘wait' /usr/include/i386-linux-gnu/sys/wait.h:116:16: note: expected ‘__WAIT_STATUS' but... (4 Replies)
Discussion started by: tafazzi87
4 Replies

9. Shell Programming and Scripting

Sqlldr call via shell script prompts error

Good morning, I'm attempting to call sqlldr via shell script and it is prompting endIf is unec #!/bin/sh cd /tmp/v_tst FILENAME_WANTED=`date +"HourlyData_%Y%m%d_%H00.txt"` echo "FILENAME_WANTED = ${FILENAME_WANTED}" LIST_OF_FILES=`ls -rt HourlyData*.txt |tail -1` LIST_OF_FILES=`basename... (4 Replies)
Discussion started by: V1l1h1
4 Replies
md(1)							    BSD General Commands Manual 						     md(1)

NAME
md -- process raw dependency files produced by cpp -MD SYNOPSIS
md [-d] [-f] [-m makefile] [-u makefile] [-o outputfile] [-v] [-x] [-D c|d|m|o|t|D] DESCRIPTION
The md command basically does two things: Process the raw dependency files produced by the cpp -MD option. There is one line in the file for every #include encountered, but there are repeats and patterns like .../dir1/../dir2 that appear which should reduce to .../dir2. md canonicalizes and flushes repeats from the depen- dency list. It also sorts the file names and "fills" them to a 78 character line. md also updates the makefile directly with the dependency information, so the .d file can be thrown away (see d option). This is done to save space. md assumes that dependency information in the makefile is sorted by .o file name and it procedes to merge in (add/or replace [as appropriate]) the new dependency lines that it has generated. For time efficiency, md assumes that any .d files it is given that were cre- ated before the creation date of the "makefile" were processed already. It ignores them unless the force flag [f] is given. FLAG SUMMARY
-D c|D|d|m|o|t Specify debugging option(s): c show file contents D show very low level debugging d show new dependency crunching m show generation of makefile o show files being opened t show time comparisons -d Delete the .d file after it is processed -f Force an update of the dependencies in the makefile, even if the makefile is more recent than the .n file. (This implies that md has been run already.) -m makefile Specify the makefile to be upgraded. The defaults are makefile and then Makefile. -o outputfile Specify an output file (other than a makefile) for the dependencies. -u makefile Like -m, but the file will be created if necessary. -v Set the verbose flag. -x Expunge old dependency information from the makefile. SEE ALSO
make(1) BUGS
Old, possibly not used by anyone. HISTORY
The md utility was written by Robert V. Baron at Carnegie-Mellon University. BSD
June 2, 2019 BSD
All times are GMT -4. The time now is 12:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy